# 1,创建客户信息
# 2，输入密码登录
# 3，选择取款，存款，或退出
print("="*60,'欢迎光临瑞士私人银行',"="*60)
bank_inf = ('张三','李四','王五')
count = 0
while bank_inf:
    name = input('请输入姓名:')
    if name == '张三':
        password = input('请输入密码:')
        # 输入密码登录
        if  int(password) == 123456:
            # 登录以后卡伊看到余额
            balance = int(500)
            print('余额:',balance)
            select = input('选择1,存款:\n选择2，取款:\n选择3,退出:')
            if int(select) == int(1):
                dep = input('请输入存款金额:')
                bd = int(balance)+int(dep)
                print('存款成功,余额为:',bd)
            elif int(select) == int(2):
                dep = input('请输入取款金额:')
                if int(dep)>int(balance):
                    print('余额不足')
                elif int(dep)<=int(balance):
                    print('取款成功,余额为:', int(balance) - int(dep))
            elif int(select) == int(3):
                print('='*30,'欢迎下次光临','='*30)
                break
        else:
            print('密码错误，请重新输入')
            count += 1
            if count == 3:
                print('卡片已锁定')
                break

    elif name == '李四':
        password = input('请输入密码:')
        if  int(password) == 666666:
            balance = int(2000)
            print('余额:',balance)
            select = input('选择1,存款:\n选择2，取款:\n选择3,退出:')
            if int(select) == int(1):
                dep = input('请输入存款金额:')
                bd = int(balance)+int(dep)
                print('存款成功,余额为:',bd)
            elif int(select) == int(2):
                dep = input('请输入取款金额:')

                if int(dep)>int(balance):
                    print('余额不足')
                elif int(dep)<=int(balance):
                    print('取款成功,余额为:', int(balance) - int(dep))
            elif int(select) == int(3):
                print('='*30,'欢迎下次光临','='*30)
                break
        else:
            print('密码错误，请重新输入')
            count += 1
            if count == 3:
                print('卡片已锁定')
                break

    elif name == '王五':
        password = input('请输入密码:')
        if  int(password) == 88888:
            balance = int(50)
            print('余额:',balance)
            select = input('选择1,存款:\n选择2，取款:\n选择3,退出:')
            if int(select) == int(1):
                dep = input('请输入存款金额:')
                bd = int(balance)+int(dep)
                print('存款成功,余额为:',bd)
            elif int(select) == int(2):
                dep = input('请输入取款金额:')

                if int(dep)>int(balance):
                    print('余额不足')
                elif int(dep)<=int(balance):
                    print('取款成功,余额为:', int(balance) - int(dep))
            elif int(select) == int(3):
                print('='*30,'欢迎下次光临','='*30)
                break
        else:
            print('密码错误，请重新输入')
            count += 1
            if count == 3:
                # 密码输错三次就退出
                print('卡片已锁定')
                break
    else:
        print('没有此用户')



